package com.fs.base.exception;

import com.fs.base.exception.enums.ExcEnum;

import lombok.Getter;
import lombok.Setter;

/**
 * @author TiddlerCJ
 * @desc 自定义异常处理类
 *
 */
public class SMException  extends RuntimeException{
	private static final long serialVersionUID = 1L;

	@Getter @Setter
	private Integer code;
	
	public SMException(Integer code,String msg){
		super(msg);
		this.code = code;
	}
	
	public SMException(ExcEnum excEnum){
		super(excEnum.getMsg());
		this.code = excEnum.getCode();
	}
}
